﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PloobsEngine.Entity;


namespace PloobsEngine.MessageSystem
{
    public class SystemRecieverMessage : IRecieveMessageEntity, IDisposable
    {
        public SystemRecieverMessage()
        {
            EntityMapper.getInstance().AddEntity(this);
        }
        
        #region IRecieveMessageEntity Members

        public bool HandleThisMessageType(SenderType type)
        {
            return type == SenderType.SYSTEM;
        }

        public virtual void HandleMessage(Message mes)
        {
            
        }

        #endregion

        #region IEntity Members
        int id;
        public int getId()
        {
            return id;
        }

        public void setId(int id)
        {
            this.id = id;
        }

        #endregion
    
        #region IDisposable Members

        public void  Dispose()
        {
            EntityMapper.getInstance().RemoveEntity(this);
        }

        #endregion
}
}
